﻿<!DOCTYPE html>
<html>
  <head>
    <title>个人信息</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <link href="resources/resources/css/jquery-ui-themes.css" type="text/css" rel="stylesheet"/>
    <link href="resources/resources/css/axure_rp_page.css" type="text/css" rel="stylesheet"/>
    <link href="resources/data/styles.css" type="text/css" rel="stylesheet"/>
    <link href="resources/files/个人信息/styles.css" type="text/css" rel="stylesheet"/>
    <script src="resources/resources/scripts/jquery-1.7.1.min.js"></script>
    <script src="resources/resources/scripts/jquery-ui-1.8.10.custom.min.js"></script>
    <style>
        #u85_img {
          border-width:0px;
          position:absolute;
          left:70px;
          top:0px;
          width:151px;
          height:113px;
        }
        #u109_input {
          position:absolute;
          left:0px;
          top:0px;
          width:103px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u116_input {
          position:absolute;
          left:0px;
          top:0px;
          width:100px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u110_input {
          position:absolute;
          left:0px;
          top:0px;
          width:105px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u115_input {
          position:absolute;
          left:-5px;
          top:0px;
          width:105px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u111_input {
          position:absolute;
          left:0px;
          top:0px;
          width:120px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u114_input {
          position:absolute;
          left:0px;
          top:0px;
          width:118px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u112_input {
          position:absolute;
          left:0px;
          top:0px;
          width:120px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u113_input {
          position:absolute;
          left:-3px;
          top:0px;
          width:120px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
        }
        #u108 {
          border-width:0px;
          position:absolute;
          left:654px;
          top:401px;
          width:80px;
          height:25px;
        }
        #u77 {
          border-width:0px;
          position:absolute;
          left:654px;
          top:436px;
          width:80px;
          height:25px;
        }
        #u108_input {
          position:absolute;
          left:0px;
          top:0px;
          width:80px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
          text-align:left;
        }
        #u77_input {
          position:absolute;
          left:0px;
          top:0px;
          width:80px;
          height:25px;
          font-family:'Arial Normal', 'Arial';
          font-weight:400;
          font-style:normal;
          font-size:13px;
          text-decoration:none;
          color:#000000;
          text-align:left;
        }
    </style>
  </head>
  <body>
    <div id="base" class="">
        <div id="yin">
            <!-- Unnamed (矩形) -->
            <div id="u29" class="ax_default box_1">
                <div id="u29_div" class=""></div>
                <div id="u29_text" class="text ">
                    <p><span>流动人口服务管理系统</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u30" class="ax_default box_1">
                <div id="u30_div" class=""></div>
                <div id="u30_text" class="text ">
                    <p><span>个人信息</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u171" class="ax_default box_1">
                <div id="u171_div" class=""></div>
                <div id="u171_text" class="text ">
                    <p><span onclick="toSpouse()">配偶信息</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u31" class="ax_default box_1">
                <div id="u31_div" class=""></div>
                <div id="u31_text" class="text ">
                    <p><span onclick="toFamilyMember()">同住家庭成员</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u32" class="ax_default box_1">
                <div id="u32_div" class=""></div>
                <div id="u32_text" class="text ">
                    <p><span onclick="toFamilyPlanning()">计生信息</span></p>
                </div>
            </div>


            <!-- Unnamed (矩形) -->
            <div id="u172" class="ax_default box_1">
                <div id="u172_div" class=""></div>
                <div id="u172_text" class="text ">
                    <p><span onclick="toEmploymentInformation()">就业信息</span></p>
                </div>
            </div>

            <!-- Unnamed (矩形) -->
            <div id="u81" class="ax_default box_1">
                <div id="u81_div" class=""></div>
                <div id="u81_text" class="text ">
                    <p><span onclick="toDwellMessage()">居住信息</span></p>
                </div>
            </div>




            <!-- Unnamed (水平线) -->
            <div id="u170" class="ax_default line">
                <img id="u170_img" class="img " src="resources/images/个人信息/u170.png"/>
            </div>
        </div>

      <!--身份证号-->
    <div>
      <div id="u43" class="ax_default box_1">
        <input id="u43_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u44" class="ax_default box_1">
        <input id="u44_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u45" class="ax_default box_1">
        <input id="u45_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u46" class="ax_default box_1">
        <input id="u46_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u47" class="ax_default box_1">
        <input id="u47_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u48" class="ax_default box_1">
        <input id="u48_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u49" class="ax_default box_1">
        <input id="u49_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u50" class="ax_default box_1">
        <input id="u50_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u51" class="ax_default box_1">
        <input id="u51_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u52" class="ax_default box_1">
        <input id="u52_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u53" class="ax_default box_1">
        <input id="u53_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u54" class="ax_default box_1">
        <input id="u54_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u55" class="ax_default box_1">
        <input id="u55_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u56" class="ax_default box_1">
        <input id="u56_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u57" class="ax_default box_1">
        <input id="u57_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u58" class="ax_default box_1">
        <input id="u58_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u59" class="ax_default box_1">
        <input id="u59_div" class="identified" maxlength="1">
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u60" class="ax_default box_1">
        <input id="u60_div" class="identified" maxlength="1">
      </div>
    </div>

<form id="form" accept-charset="UTF-8" enctype="multipart/form-data" method="post">
      <!-- Unnamed (矩形) -->
      <div id="u33" class="ax_default box_1">
        <div id="u33_div" class=""></div>
        <div id="u33_text" class="text ">
          <p><span>姓名：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u35" class="ax_default box_1">
        <div id="u35_div" class=""></div>
        <div id="u35_text" class="text ">
          <p><span>曾用名：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u37" class="ax_default box_1">
        <div id="u37_div" class=""></div>
        <div id="u37_text" class="text ">
          <p><span>来本地时间：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u39" class="ax_default box_1">
        <div id="u39_div" class=""></div>
        <div id="u39_text" class="text ">
          <p><span>户籍详细地址：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u40" class="ax_default box_1">
        <div id="u40_div" class=""></div>
        <div id="u40_text" class="text ">
          <p><span>民族：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u41" class="ax_default box_1">
        <div id="u41_div" class=""></div>
        <div id="u41_text" class="text ">
          <p><span>现居住地地址：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u38" class="ax_default box_1">
        <div id="u38_div" class=""></div>
        <div id="u38_text" class="text ">
          <p><span>公民身份号码：</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u66" class="ax_default box_1">
        <div id="u66_div" class=""></div>
        <div id="u66_text" class="text ">
          <p><span>村（社区）</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u78" class="ax_default box_1">
        <div id="u78_div" class=""></div>
        <div id="u78_text" class="text ">
          <p><span>村（社区）</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u79" class="ax_default box_1">
        <div id="u79_div" class=""></div>
        <div id="u79_text" class="text ">
          <p><span>紧急联系方式：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u80" class="ax_default box_1">
        <div id="u80_div" class=""></div>
        <div id="u80_text" class="text ">
          <p><span>（门楼详址）</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u86" class="ax_default box_1">
        <div id="u86_div" class=""></div>
        <div id="u86_text" class="text ">
          <p><span>宗教信仰：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u96" class="ax_default box_1">
        <div id="u96_div" class=""></div>
        <div id="u96_text" class="text ">
          <p><span>从业状况;</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u117" class="ax_default box_1">
        <div id="u117_div" class=""></div>
        <div id="u117_text" class="text ">
          <p><span>移动电话：</span></p>
        </div>
      </div>

      <!-- Unnamed (矩形) -->
      <div id="u153" class="ax_default box_1">
        <div id="u153_div" class=""></div>
        <div id="u153_text" class="text ">
          <p><span>健康状况：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u160" class="ax_default box_1">
        <div id="u160_div" class=""></div>
        <div id="u160_text" class="text ">
          <p><span>血型：</span></p>
        </div>
      </div>
      <!-- 底部 (矩形) -->
      <div id="u83" class="ax_default box_3">
        <div id="u83_div" class=""></div>
      </div>
      <!-- 底部 (矩形) -->
      <div id="u84" class="ax_default box_1">
        <div id="u84_div" class=""></div>
        <div id="u84_text" class="text ">
          <p><span>版权所有：公安局</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u106" class="ax_default box_1">
        <div id="u106_div" class=""></div>
        <div id="u106_text" class="text">
          <p><span>性别：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u119" class="ax_default box_1">
        <div id="u119_div" class=""></div>
        <div id="u119_text" class="text ">
          <p><span>固定电话：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u121" class="ax_default box_1">
        <div id="u121_div" class=""></div>
        <div id="u121_text" class="text ">
          <p><span>本人联系方式：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u127" class="ax_default box_1">
        <div id="u127_div" class=""></div>
        <div id="u127_text" class="text ">
          <p><span>文化程度：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u140" class="ax_default box_1">
        <div id="u140_div" class=""></div>
        <div id="u140_text" class="text ">
          <p><span>政治面貌：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u146" class="ax_default box_1">
        <div id="u146_div" class=""></div>
        <div id="u146_text" class="text ">
          <p><span>身高:</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u147" class="ax_default box_1">
        <div id="u147_div" class=""></div>
        <div id="u147_text" class="text ">
          <p><span>身体状况:</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u122" class="ax_default box_1">
        <div id="u122_div" class=""></div>
        <div id="u122_text" class="text ">
          <p><span>联系人：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u125" class="ax_default box_1">
        <div id="u125_div" class=""></div>
        <div id="u125_text" class="text ">
          <p><span>移动电话：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u150" class="ax_default box_1">
        <div id="u150_div" class=""></div>
        <div id="u150_text" class="text ">
          <p><span>体重：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u151" class="ax_default label">
        <div id="u151_div" class=""></div>
        <div id="u151_text" class="text ">
          <p><span>公斤</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u123" class="ax_default box_1">
        <div id="u123_div" class=""></div>
        <div id="u123_text" class="text ">
          <p><span>固定电话：</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u149" class="ax_default label">
        <div id="u149_div" class=""></div>
        <div id="u149_text" class="text ">
          <p><span>cm</span></p>
        </div>
      </div>
      <!-- Unnamed (矩形) -->
      <div id="u165" class="ax_default box_1">
        <div id="u165_div" class=""></div>
        <div id="u165_text" class="text ">
          <p><span>婚姻状况：</span></p>
        </div>
      </div>



      <!-- Unnamed (矩形) -->
      <div id="u173" class="ax_default button" >
        <div id="u173_text" class="text ">
          <button id="u173_div" type="button" onclick="submitInformation()">保存</button>
        </div>
      </div>



      <!-- 联系人 (文本框) -->
      <div id="u42" class="ax_default text_field">
        <input id="u42_input" class="contactName" name="contactName" type="text" value=""/>
      </div>
      <!-- 姓名 (文本框) -->
      <div id="u34" class="ax_default text_field">
        <input id="u34_input" class="name" name="name" type="text" value="" placeholder="张三"/>
      </div>
      <!-- 曾用名 (文本框) -->
      <div id="u36" class="ax_default text_field">
        <input id="u36_input" class="formerName" name="formerName" type="text" value="" placeholder="张大"/>
      </div>
      <!-- 民族 (文本框) -->
      <div id="u61" class="ax_default text_field">
        <select id="u61_input" class="nationalId" name="nationalId">
            <option value="0" >请选择：</option>
        </select>
      </div>
      <!-- 门楼详址 (文本框) -->
      <div id="u70" class="ax_default text_field">
        <input id="u70_input" type="text" class="detailedAddress" name="detailedAddress" value=""/>
      </div>
      <!-- 现居村 (文本框) -->
      <div id="u77" class="ax_default text_field">
        <input id="u77_input" type="text" class="nowInVillage" name="nowInVillage" value=""/>
      </div>
      <!-- 来时间 (文本框) -->
      <div id="u82" class="ax_default text_field">
        <input id="u82_input" class="comeTime" name="comeTimeStr" type="date" />
      </div>

      <!-- 性别 (下拉列表框) -->
      <div id="u107" class="ax_default droplist">
        <select id="u107_input" class="sex" name="sex">
          <option value="1">男</option>
          <option value="0">女</option>
        </select>
      </div>

      <!-- 户籍村 (文本框) -->
      <div id="u108" class="ax_default text_field">
        <input id="u108_input" class="householdRegistrationVillage" name="householdRegistrationVillage" type="text" value=""/>
      </div>

      <!-- 户籍省 (下拉列表框) -->
      <div id="u109" class="ax_default droplist">
        <select id="u109_input" class="householdRegistrationProvince" name="householdRegistrationProvince" onchange="loadOldCityByProvince()">
            <option value="0" >请选择省：</option>
        </select>
      </div>

      <!-- 户籍市 (下拉列表框) -->
      <div id="u110" class="ax_default droplist">
        <select id="u110_input" class="householdRegistrationCity" name="householdRegistrationCity" onchange="loadOldCountyByCity()">
            <option value="0" >请选择市：</option>
        </select>
      </div>

      <!-- 户籍县 (下拉列表框) -->
      <div id="u111" class="ax_default droplist">
        <select id="u111_input" class="householdRegistrationCounty" name="householdRegistrationCounty" onchange="loadOldTownshipByCounty()">
            <option value="0" >请选择区：</option>
        </select>
      </div>

      <!-- 户籍镇 (下拉列表框) -->
      <div id="u112" class="ax_default droplist">
        <select id="u112_input" class="householdRegistrationTownship" name="householdRegistrationTownship">
            <option value="0" >请选择镇：</option>
        </select>
      </div>

      <!-- 现居镇 (下拉列表框) -->
      <div id="u113" class="ax_default droplist">
        <select id="u113_input" class="nowInTownship" name="nowInTownship">
            <option value="0" >请选择镇：</option>
        </select>
      </div>

      <!-- 现居乡 (下拉列表框) -->
      <div id="u114" class="ax_default droplist">
        <select id="u114_input" class="nowInCounty" name="nowInCounty" onchange="loadNowTownshipByCounty()">
            <option value="0" >请选择区：</option>
        </select>
      </div>

      <!-- 现居市 (下拉列表框) -->
      <div id="u115" class="ax_default droplist">
        <select id="u115_input" class="nowInCity" name="nowInCity" onchange="loadNowCountyByCity()">
            <option value="0" >请选择市：</option>
        </select>
      </div>

      <!-- 现居省 (下拉列表框) -->
      <div id="u116" class="ax_default droplist">
        <select id="u116_input" class="nowInProvince" name="nowInProvince" onchange="loadNowCityByProvince()">
            <option value="0" >请选择省：</option>
        </select>
      </div>

      <!-- 个人移动电话 (文本框) -->
      <div id="u118" class="ax_default text_field">
        <input id="u118_input" class="personalMobilePhone" name="personalMobilePhone" maxlength="11" onkeyup="value=value.replace(/[^\d]/g,'')" type="text" value=""/>
      </div>

      <!-- 联系人固定电话 (文本框) -->
      <div id="u120" class="ax_default text_field">
        <input id="u120_input" class="contactLandline" name="contactLandline" maxlength="11" onkeyup="value=value.replace(/[^\d]/g,'')" type="text" value=""/>
      </div>

      <!-- 个人固定电话 (文本框) -->
      <div id="u124" class="ax_default text_field">
        <input id="u124_input" class="personalLandline" name="personalLandline" maxlength="11" onkeyup="value=value.replace(/[^\d]/g,'')" type="text" value=""/>
      </div>

      <!-- 联系人移动电话 (文本框) -->
      <div id="u126" class="ax_default text_field">
        <input id="u126_input" class="contactMobilePhone" name="contactMobilePhone" maxlength="11" onkeyup="value=value.replace(/[^\d]/g,'')" type="text" value=""/>
      </div>

      <!-- 高度 (文本框) -->
      <div id="u148" class="ax_default text_field">
        <input id="u148_input" name="height" class="height" maxlength="3" onkeyup = "value=value.replace(/[^\d]/g,'')" type="text" value=""/>
      </div>

      <!-- 重量 (文本框) -->
      <div id="u152" class="ax_default text_field">
        <input id="u152_input" name="weight" class="weight" maxlength="4" onkeyup = "value=value.replace(/[^\d]/g,'')" type="text" value=""/>
      </div>

      <!--从业状况-->
      <div>
          <!-- 从业状况 (单选按钮) -->
          <div id="u128" class="ax_default radio_button">
            <label for="u128_input" style="position: absolute; left: 0px;">
              <div id="u128_text" class="text ">
                <p><span>国家机关</span></p>
              </div>
            </label>
            <input id="u128_input" class="workingConditions" type="radio" value="36" name="workingConditions"/>
          </div>
          <!-- Unnamed (单选按钮) -->
          <div id="u129" class="ax_default radio_button">
            <label for="u129_input" style="position: absolute; left: 0px;">
              <div id="u129_text" class="text ">
                <p><span>企、事业单位</span></p>
              </div>
            </label>
            <input id="u129_input" type="radio" value="37" name="workingConditions"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u130" class="ax_default radio_button">
            <label for="u130_input" style="position: absolute; left: 0px;">
              <div id="u130_text" class="text ">
                <p><span>自由职业</span></p>
              </div>
            </label>
            <input id="u130_input" type="radio" value="38" name="workingConditions"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u131" class="ax_default radio_button">
            <label for="u131_input" style="position: absolute; left: 0px;">
              <div id="u131_text" class="text ">
                <p><span>民营（个体）</span></p>
              </div>
            </label>
            <input id="u131_input" type="radio" value="39" name="workingConditions"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u132" class="ax_default radio_button">
            <label for="u132_input" style="position: absolute; left: 0px;">
              <div id="u132_text" class="text ">
                <p><span>离（退）休</span></p>
              </div>
            </label>
            <input id="u132_input" type="radio" value="40" name="workingConditions"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u133" class="ax_default radio_button">
            <label for="u133_input" style="position: absolute; left: 0px;">
              <div id="u133_text" class="text ">
                <p><span>无业</span></p>
              </div>
            </label>
            <input id="u133_input" type="radio" value="43" name="workingConditions"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u134" class="ax_default radio_button">
            <label for="u134_input" style="position: absolute; left: 0px;">
              <div id="u134_text" class="text ">
                <p><span>其他</span></p>
              </div>
            </label>
            <input id="u134_input" type="radio" value="44" name="workingConditions"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u135" class="ax_default radio_button">
            <label for="u135_input" style="position: absolute; left: 0px;">
              <div id="u135_text" class="text ">
                <p><span>学生</span></p>
              </div>
            </label>
            <input id="u135_input" type="radio" value="41" name="workingConditions"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u136" class="ax_default radio_button">
            <label for="u136_input" style="position: absolute; left: 0px;">
              <div id="u136_text" class="text ">
                <p><span>农民</span></p>
              </div>
            </label>
            <input id="u136_input" type="radio" value="42" name="workingConditions"/>
          </div>
      </div>
      <!--政治面貌-->
      <div>
          <!-- 政治面貌 (单选按钮) -->
          <div id="u154" class="ax_default radio_button">
            <label for="u154_input" style="position: absolute; left: 0px;">
              <div id="u154_text" class="text ">
                <p><span>中共党员</span></p>
              </div>
            </label>
            <input id="u154_input" type="radio" value="13" name="politicalLandscape"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u155" class="ax_default radio_button">
            <label for="u155_input" style="position: absolute; left: 0px;">
              <div id="u155_text" class="text ">
                <p><span>共青团员</span></p>
              </div>
            </label>
            <input id="u155_input" type="radio" value="14" name="politicalLandscape"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u156" class="ax_default radio_button">
            <label for="u156_input" style="position: absolute; left: 0px;">
              <div id="u156_text" class="text ">
                <p><span>民主党派</span></p>
              </div>
            </label>
            <input id="u156_input" type="radio" value="15" name="politicalLandscape"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u157" class="ax_default radio_button">
            <label for="u157_input" style="position: absolute; left: 0px;">
              <div id="u157_text" class="text ">
                <p><span>无党派民主人士</span></p>
              </div>
            </label>
            <input id="u157_input" type="radio" value="16" name="politicalLandscape"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u158" class="ax_default radio_button">
            <label for="u158_input" style="position: absolute; left: 0px;">
              <div id="u158_text" class="text ">
                <p><span>群众</span></p>
              </div>
            </label>
            <input id="u158_input" type="radio" value="17" name="politicalLandscape"/>
          </div>
      </div>
      <!-- 血型 (单选按钮) -->
      <div>
          <!-- 血型 (单选按钮) -->
          <div id="u141" class="ax_default radio_button">
            <label for="u141_input" style="position: absolute; left: 0px;">
              <div id="u141_text" class="text ">
                <p><span>不明</span></p>
              </div>
            </label>
            <input id="u141_input" type="radio" value="27" name="bloodType"/>
          </div>
          <!-- Unnamed (单选按钮) -->
          <div id="u159" class="ax_default radio_button">
            <label for="u159_input" style="position: absolute; left: 0px;">
              <div id="u159_text" class="text ">
                <p><span>AB型</span></p>
              </div>
            </label>
            <input id="u159_input" type="radio" value="radio" name="bloodType"/>
          </div>
          <!-- Unnamed (单选按钮) -->
          <div id="u142" class="ax_default radio_button">
            <label for="u142_input" style="position: absolute; left: 0px;">
              <div id="u142_text" class="text ">
                <p><span>A型</span></p>
              </div>
            </label>
            <input id="u142_input" type="radio" value="28" name="bloodType"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u143" class="ax_default radio_button">
            <label for="u143_input" style="position: absolute; left: 0px;">
              <div id="u143_text" class="text ">
                <p><span>B型</span></p>
              </div>
            </label>
            <input id="u143_input" type="radio" value="29" name="bloodType"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u144" class="ax_default radio_button">
            <label for="u144_input" style="position: absolute; left: 0px;">
              <div id="u144_text" class="text ">
                <p><span>O型</span></p>
              </div>
            </label>
            <input id="u144_input" type="radio" value="30" name="bloodType"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u145" class="ax_default radio_button">
            <label for="u145_input" style="position: absolute; left: 0px;">
              <div id="u145_text" class="text ">
                <p><span>其他</span></p>
              </div>
            </label>
            <input id="u145_input" type="radio" value="32" name="bloodType"/>
          </div>
      </div>
      <!-- 婚姻状况 (单选按钮) -->
      <div>
          <!-- 婚姻状况 (单选按钮) -->
         <div id="u166" class="ax_default radio_button">
           <label for="u166_input" style="position: absolute; left: 0px;">
             <div id="u166_text" class="text ">
               <p><span>未婚</span></p>
             </div>
           </label>
           <input id="u166_input" class="maritalStatus" type="radio" value="45" name="maritalStatus"/>
         </div>
         <div id="u167" class="ax_default radio_button">
           <label for="u167_input" style="position: absolute; left: 0px;">
             <div id="u167_text" class="text ">
               <p><span>已婚</span></p>
             </div>
           </label>
           <input id="u167_input" type="radio" value="46" name="maritalStatus"/>
         </div>
         <!-- Unnamed (单选按钮) -->
         <div id="u168" class="ax_default radio_button">
           <label for="u168_input" style="position: absolute; left: 0px;">
             <div id="u168_text" class="text ">
               <p><span>丧偶</span></p>
             </div>
           </label>
           <input id="u168_input" type="radio" value="47" name="maritalStatus"/>
         </div>
         <!-- Unnamed (单选按钮) -->
         <div id="u169" class="ax_default radio_button">
           <label for="u169_input" style="position: absolute; left: 0px;">
             <div id="u169_text" class="text ">
               <p><span>其他</span></p>
             </div>
           </label>
           <input id="u169_input" type="radio" value="48" name="maritalStatus"/>
         </div>
      </div>
      <!-- 健康状态 (单选按钮) -->
      <div>
          <!-- 健康状态 (单选按钮) -->
          <div id="u161" class="ax_default radio_button">
            <label for="u161_input" style="position: absolute; left: 0px;">
              <div id="u161_text" class="text ">
                <p><span>健康</span></p>
              </div>
            </label>
            <input id="u161_input" type="radio" value="33" name="healthyState"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u162" class="ax_default radio_button">
            <label for="u162_input" style="position: absolute; left: 0px;">
              <div id="u162_text" class="text ">
                <p><span>一般</span></p>
              </div>
            </label>
            <input id="u162_input" type="radio" value="34" name="healthyState"/>
          </div>

          <!-- Unnamed (单选按钮) -->
          <div id="u163" class="ax_default radio_button">
            <label for="u163_input" style="position: absolute; left: 0px;">
              <div id="u163_text" class="text ">
                <p><span>残疾</span></p>
              </div>
            </label>
            <input id="u163_input" type="radio" value="35" name="healthyState"/>
          </div>
      </div>
      <!-- 宗教 (单选按钮) -->
      <div>
          <!-- Unnamed (单选按钮) -->
          <div id="u87" class="ax_default radio_button">
            <label for="u87_input" style="position: absolute; left: 0px;">
              <div id="u87_text" class="text ">
                <p><span>无</span></p>
              </div>
            </label>
            <input id="u87_input" type="radio" value="18" name="religiousBeliefs"/>
          </div>
          <!-- Unnamed (单选按钮) -->
                <div id="u88" class="ax_default radio_button">
                  <label for="u88_input" style="position: absolute; left: 0px;">
                    <div id="u88_text" class="text ">
                      <p><span>佛教</span></p>
                    </div>
                  </label>
                  <input id="u88_input" type="radio" value="19" name="religiousBeliefs"/>
                </div>

                <!-- Unnamed (单选按钮) -->
                <div id="u89" class="ax_default radio_button">
                  <label for="u89_input" style="position: absolute; left: 0px;">
                    <div id="u89_text" class="text ">
                      <p><span>喇嘛教</span></p>
                    </div>
                  </label>
                  <input id="u89_input" type="radio" value="20" name="religiousBeliefs"/>
                </div>

                <!-- Unnamed (单选按钮) -->
                <div id="u90" class="ax_default radio_button">
                  <label for="u90_input" style="position: absolute; left: 0px;">
                    <div id="u90_text" class="text ">
                      <p><span>道教</span></p>
                    </div>
                  </label>
                  <input id="u90_input" type="radio" value="21" name="religiousBeliefs"/>
                </div>

                <!-- Unnamed (单选按钮) -->
                <div id="u91" class="ax_default radio_button">
                  <label for="u91_input" style="position: absolute; left: 0px;">
                    <div id="u91_text" class="text ">
                      <p><span>天主教</span></p>
                    </div>
                  </label>
                  <input id="u91_input" type="radio" value="22" name="religiousBeliefs"/>
                </div>

                <!-- Unnamed (单选按钮) -->
                <div id="u92" class="ax_default radio_button">
                  <label for="u92_input" style="position: absolute; left: 0px;">
                    <div id="u92_text" class="text ">
                      <p><span>基督教</span></p>
                    </div>
                  </label>
                  <input id="u92_input" type="radio" value="23" name="religiousBeliefs"/>
                </div>

                <!-- Unnamed (单选按钮) -->
                <div id="u93" class="ax_default radio_button">
                  <label for="u93_input" style="position: absolute; left: 0px;">
                    <div id="u93_text" class="text ">
                      <p><span>东正教</span></p>
                    </div>
                  </label>
                  <input id="u93_input" type="radio" value="24" name="religiousBeliefs"/>
                </div>

                <!-- Unnamed (单选按钮) -->
                <div id="u94" class="ax_default radio_button">
                  <label for="u94_input" style="position: absolute; left: 0px;">
                    <div id="u94_text" class="text ">
                      <p><span>伊斯兰教</span></p>
                    </div>
                  </label>
                  <input id="u94_input" type="radio" value="25" name="religiousBeliefs"/>
                </div>

                <!-- Unnamed (单选按钮) -->
                <div id="u95" class="ax_default radio_button">
                  <label for="u95_input" style="position: absolute; left: 0px;">
                    <div id="u95_text" class="text ">
                      <p><span>其他</span></p>
                    </div>
                  </label>
                  <input id="u95_input" type="radio" value="26" name="religiousBeliefs"/>
                </div>
      </div>
      <!-- 文化程度 (单选按钮) -->
      <div>
              <!-- 文化程度 (单选按钮) -->
                    <div id="u97" class="ax_default radio_button">
                      <label for="u97_input" style="position: absolute; left: 0px;">
                        <div id="u97_text" class="text ">
                          <p><span>博士</span></p>
                        </div>
                      </label>
                      <input id="u97_input" type="radio" value="2" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u98" class="ax_default radio_button">
                      <label for="u98_input" style="position: absolute; left: 0px;">
                        <div id="u98_text" class="text ">
                          <p><span>硕士</span></p>
                        </div>
                      </label>
                      <input id="u98_input" type="radio" value="1" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u99" class="ax_default radio_button">
                      <label for="u99_input" style="position: absolute; left: 0px;">
                        <div id="u99_text" class="text ">
                          <p><span>大学本科</span></p>
                        </div>
                      </label>
                      <input id="u99_input" type="radio" value="3" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u100" class="ax_default radio_button">
                      <label for="u100_input" style="position: absolute; left: 0px;">
                        <div id="u100_text" class="text ">
                          <p><span>大专</span></p>
                        </div>
                      </label>
                      <input id="u100_input" type="radio" value="4" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u101" class="ax_default radio_button">
                      <label for="u101_input" style="position: absolute; left: 0px;">
                        <div id="u101_text" class="text ">
                          <p><span>中专</span></p>
                        </div>
                      </label>
                      <input id="u101_input" type="radio" value="5" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u102" class="ax_default radio_button">
                      <label for="u102_input" style="position: absolute; left: 0px;">
                        <div id="u102_text" class="text ">
                          <p><span>职高</span></p>
                        </div>
                      </label>
                      <input id="u102_input" type="radio" value="8" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u103" class="ax_default radio_button">
                      <label for="u103_input" style="position: absolute; left: 0px;">
                        <div id="u103_text" class="text ">
                          <p><span>职专</span></p>
                        </div>
                      </label>
                      <input id="u103_input" type="radio" value="9" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u104" class="ax_default radio_button">
                      <label for="u104_input" style="position: absolute; left: 0px;">
                        <div id="u104_text" class="text ">
                          <p><span>技校</span></p>
                        </div>
                      </label>
                      <input id="u104_input" type="radio" value="6" name="educationLevel"/>
                    </div>

                    <!-- Unnamed (单选按钮) -->
                    <div id="u105" class="ax_default radio_button">
                      <label for="u105_input" style="position: absolute; left: 0px;">
                        <div id="u105_text" class="text ">
                          <p><span>高中</span></p>
                        </div>
                      </label>
                      <input id="u105_input" type="radio" value="7" name="educationLevel"/>
                    </div>

          </div>

        <input type="hidden" id="id">
        <input type="hidden" id="employment_message_id">
        <input type="hidden" id="dwell_message_id">
        <input type="hidden" id="family_planning_id">
        <input type="hidden" id="spouse">

</form>
 <!-- Unnamed (图片) -->
      <div id="u85" class="ax_default image" selectiongroup="照片">
        <input id="image" name="image" type="file" accept="image/jpeg"/>
        <img id="u85_img" class="img " src="resources/images/个人信息/u85.png"/>
      </div>

    </div>
  </body>
<script>
    var id;
    var session = "";
    $(function() {
        $("#u59_div").keyup(function() {
            if($("#u59_div").val()%2==0){
                $("#u107_input").val(0);
            }else {
                $("#u107_input").val(1);
            }
        })
        var p,c,t;
        $("#u44_div").keyup(function() {
            p = $("#u43_div").val()+$("#u44_div").val();
            $("#u109_input").val(p);
            loadOldCityByProvince($("#u109_input").val());
        })
        $("#u46_div").keyup(function() {
            c = $("#u45_div").val()+$("#u46_div").val();
            $("#u110_input").val(p+c);
            loadOldCountyByCity($("#u110_input").val());
        })
        $("#u48_div").keyup(function() {
            t = $("#u47_div").val()+$("#u48_div").val();
            $("#u111_input").val(p+c+t);
            loadOldTownshipByCounty($("#u111_input").val())
        })
        $.ajax({
            url:"/getSession",
            dataType:"json",
            type:"post",
            async:false,
            success:function(data) {
                session = data;
            }
        })
        loadAllProvince();
        loadAllNation();
        inputIdentified('.identified');
        changeImage();
        var split = location.href.split("id=");//个人信息id
        //如果personid传过来，填充数据
        if(split.length>1){
            id = (split[1].split("&"))[0];
            findPersonalMessageById(id);
            var aa = (split[1].split("&"))[1];
            if(aa==undefined){
                return;
            }
            //如果就业id传过来，判断（如果隐藏就业id为空），更新个人表个就业id，否则判断（之前存的和现在的是否一致）
            if(aa.indexOf("employmentMessageId")!=-1){
                var employmentMessageId = split[1].split("employmentMessageId=")[1];
                if($("#employment_message_id").val()==""||$("#employment_message_id").val()==null||$("#employment_message_id").val()!=employmentMessageId){
                    $("#employment_message_id").val(employmentMessageId);
                }
                updatePersonalInformation(employmentMessageId);
            }
            //如果配偶id传过来，判断（如果隐藏配偶id为空），更新个人表个配偶id，否则判断（之前存的和现在的是否一致）
            if(aa.indexOf("spouse")!=-1){
                var spouseId = split[1].split("spouse=")[1];
                if($("#spouse").val()==""||$("#spouse").val()==null||$("#spouse").val()!=spouseId){
                    $("#spouse").val(spouseId);
                }
                updatePersonalInformation(spouseId);
            }
            if(aa.indexOf("dwellMessageId")!=-1){
                var dwellMessageId = split[1].split("dwellMessageId=")[1];
                if($("#dwell_message_id").val()==""||$("#dwell_message_id").val()==null||$("#dwell_message_id").val()!=dwellMessageId){
                    $("#dwell_message_id").val(dwellMessageId);
                }
                updatePersonalInformation(dwellMessageId);
            }
            if(aa.indexOf("planingId")!=-1){
                var planingId = split[1].split("planingId=")[1];
                if($("#family_planning_id").val()==""||$("#family_planning_id").val()==null||$("#family_planning_id").val()!=planingId){
                    $("#family_planning_id").val(planingId);
                }
                updatePersonalInformation(planingId);
            }
        }
        //checkAll();
    })
    function updatePersonalInformation(id) {
        var formData = new FormData();
        formData.append("id",$("#id").val());
        if($("#spouse").val()!=""){
            formData.append("spouse",$("#spouse").val())
        }
        if($("#employment_message_id").val()!=""){
            formData.append("employmentMessageId",$("#employment_message_id").val())
        }
        if($("#dwell_message_id").val()!=""){
            formData.append("dwellMessageId",$("#dwell_message_id").val())
        }
        if($("#family_planning_id").val()!=""){
            formData.append("familyPlanningId",$("#family_planning_id").val())
        }

        $.ajax({
            url:"/updatePersonalInformation",
            data:formData,
            type:"post",
            dataType:"json",
            processData:false,
            contentType:false,
            success:function(data) {

            }
        })
    }
    function findPersonalMessageById(id) {
        $.ajax({
            url:"/findPersonalMessageById",
            data:{id:id},
            dataType:"json",
            type:"post",
            async:false,
            success:function(data) {
                var identifiedArr = new Array();
                for (var i = 1;i <= data.identified.length;i++){
                    identifiedArr.push(data.identified.substring(i-1,i))
                }
                $.each($(".identified"),function(index,item) {
                    $(item).val(identifiedArr[index]);
                })
                $("input[name='name']").val(data.name);
                $("input[name='formerName']").val(data.formerName);
                $("select[name='sex']").val(data.sex);
                var date = new Date(data.comeTime);
                var month = ("0"+(date.getMonth()+1)).slice(-2);//++++++
                var day = ("0"+date.getDate()).slice(-2);
                $("input[name='comeTimeStr']").val((date.getFullYear()+"-"+(month)+"-"+(day)));
                loadAllNation();
                $("select[name='nationalId']").val(data.nationalId);
                loadAllProvince();
                $("select[name='householdRegistrationProvince']").val(data.householdRegistrationProvince);
                loadOldCityByProvince();
                $("select[name='householdRegistrationCity']").val(data.householdRegistrationCity);
                loadOldCountyByCity();
                $("select[name='householdRegistrationCounty']").val(data.householdRegistrationCounty);
                loadOldTownshipByCounty();
                $("select[name='householdRegistrationTownship']").val(data.householdRegistrationTownship);
                $("input[name='householdRegistrationVillage']").val(data.householdRegistrationVillage);
                $("select[name='nowInProvince']").val(data.nowInProvince);
                loadNowCityByProvince();
                $("select[name='nowInCity']").val(data.nowInCity);
                loadNowCountyByCity();
                $("select[name='nowInCounty']").val(data.nowInCounty);
                loadNowTownshipByCounty();
                $("select[name='nowInTownship']").val(data.nowInTownship);
                $("input[name='nowInVillage']").val(data.nowInVillage);
                $("input[name='detailedAddress']").val(data.detailedAddress);
                $.each($("input[name='educationLevel']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.educationLevel){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $("input[name='height']").val(data.height);
                $("input[name='weight']").val(data.weight);
                $("input[name='personalLandline']").val(data.personalLandline);
                $("input[name='personalMobilePhone']").val(data.personalMobilePhone);
                $("input[name='contactName']").val(data.contactName);
                $("input[name='contactLandline']").val(data.contactLandline);
                $("input[name='contactMobilePhone']").val(data.contactMobilePhone);
                $.each($("input[name='healthyState']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.healthyState){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $.each($("input[name='politicalLandscape']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.politicalLandscape){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $.each($("input[name='religiousBeliefs']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.religiousBeliefs){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $.each($("input[name='bloodType']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.bloodType){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $.each($("input[name='workingConditions']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.workingConditions){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                $.each($("input[name='maritalStatus']"),function(index,item) {//遍历单选框
                    if($(item).val()==data.maritalStatus){//如果为要选的值
                        $(item).attr("checked","checked");//赋值
                    }
                })
                if(data.img!=null&&data.img!=""){
                    $.ajax({
                        url:'/downloadShowFile',
                        data:{path:data.img},
                        type:'get',
                        async:false,
                        success:function(data) {
                            $("#u85_img").attr("src",data);
                        }
                    })

                }

                $("#id").val(data.id);
                $("#employment_message_id").val(data.employmentMessageId);
                $("#spouse").val(data.spouse);
                $("#dwell_message_id").val(data.dwellMessageId);
            }
        })
    }
    /**
     * 跳转到就业信息，传递省码
     */
    function toEmploymentInformation() {
        if($("#id").val()!=''&&$("#id").val()!=null){
            if($("#employment_message_id").val()!=''&&$("#employment_message_id").val()!=null){
                window.location = "/toEmploymentInformation?personalId="+$("#id").val()+"&provinceCode="+$('#u116_input').val()+"&employmentMessageId="+$("#employment_message_id").val();
                return;
            }
            window.location = "/toEmploymentInformation?personalId="+$("#id").val()+"&provinceCode="+$('#u116_input').val();
        }else {
            alert("请先上传个人信息表")
        }
    }
    /**
     * 跳转到配偶信息，传递省码
     */
    function toSpouse() {
        if($("#id").val()!=''&&$("#id").val()!=null){
            if($("#spouse").val()!=''&&$("#spouse").val()!=null){
                window.location = "/toSpouse?personalId="+$("#id").val()+"&spouse="+$("#spouse").val();
                return;
            }
            window.location = "/toSpouse?personalId="+$("#id").val();
        }else {
            alert("请先上传个人信息表")
        }
    }
    /**
     * 跳转到居住信息，传递省码
     */
    function toDwellMessage() {
        if($("#id").val()!=''&&$("#id").val()!=null){
            if($("#dwell_message_id").val()!=''&&$("#dwell_message_id").val()!=null){
                window.location = "/toDwellMessage?personalId="+$("#id").val()+"&provinceCode="+$('#u116_input').val()+"&dwellMessageId="+$("#dwell_message_id").val();
                return;
            }
            window.location = "/toDwellMessage?personalId="+$("#id").val()+"&provinceCode="+$('#u116_input').val();
        }else {
            alert("请先上传个人信息表")
        }
    }
    /**
     * 跳转到计生信息，传递省码
     */
    function toFamilyPlanning() {
        if($("#id").val()!=''&&$("#id").val()!=null){
            if($("#family_planning_id").val()!=''&&$("#family_planning_id").val()!=null){
                window.location = "/toFamilyPlanning?personalId="+$("#id").val()+"&provinceCode="+$('#u116_input').val()+"&planingId="+$("#family_planning_id").val();
                return;
            }
            window.location = "/toFamilyPlanning?personalId="+$("#id").val()+"&provinceCode="+$('#u116_input').val();
        }else {
            alert("请先上传个人信息表")
        }
    }
    /**
     * 跳转到成员信息，传递省码 TODO
     */
    function toFamilyMember() {
        if($("#id").val()!=''&&$("#id").val()!=null){
            window.location = "/toFamilyMember?personalId="+$("#id").val();
        }else {
            alert("请先上传个人信息表")
        }
    }
    /**
     * 验证所有
     */  
    function checkAll() {
        $(".name").blur(function() {
            checkText($(".name"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名不能为空","姓名格式错误");
        })
        $(".formerName").blur(function() {
            checkText($(".formerName"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名不能为空","姓名格式错误");
        })
        $(".personalMobilePhone").blur(function() {
            checkText($(".personalMobilePhone"),/^1[3456789]\d{9}$/,"手机不能为空","手机格式错误");
        })
        $(".personalLandline").blur(function() {
            checkTextNull($(".personalLandline"),/^((\d{3,4})|\d{3,4}-|\s)?\d{7,14}$/,"电话格式错误");
        })
        $(".contactName").blur(function() {
            checkTextNull($(".contactName"),/^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/,"姓名格式错误");
        })
        $(".contactLandline").blur(function() {
            checkTextNull($(".contactLandline"),/^((\d{3,4})|\d{3,4}-|\s)?\d{7,14}$/,"电话格式错误");
        })
        $(".contactMobilePhone").blur(function() {
            checkTextNull($(".contactMobilePhone"),/^1[3456789]\d{9}$/,"手机格式错误");
        })
    }
    /**
     * 不为空
     */
    function checkText(dom,reg,tip,tip2) {
        if(dom.val()==""||dom.val()==null){
            return false;
        }else if(!reg.test(dom.val())){
            return false;
        }
        return true;
    }
    /**
     * 可为空
     */
    function checkTextNull(dom,reg,tip2) {
        if(dom.val()==""||dom.val()==null){
            return true;
        }else if(!reg.test(dom.val())){
            return false;
        }
        return true;
    }
    /**
     * 时间、字符串验证
     */
    function checkString() {
        if(!checkText($(".name"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名不能为空","姓名格式错误")){
            alert("姓名格式错误");
            return false;
        }
        if(!checkText($(".formerName"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名不能为空","姓名格式错误")){
            alert("姓名格式错误");
            return false;
        }
        if(!checkText($(".personalMobilePhone"),/^1[3456789]\d{9}$/,"手机不能为空","手机格式错误")){
            alert("手机格式错误");
            return false;
        }
        if(!checkTextNull($(".personalLandline"),/^((\d{3,4})|\d{3,4}-|\s)?\d{7,14}$/,"电话格式错误")){
            alert("电话格式错误");
            return false;
        }
        if(!checkTextNull($(".contactName"),/^[\u4E00-\u9FA5\uf900-\ufa2d·\s]{2,20}$/,"姓名格式错误")){
            alert("姓名格式错误");
            return false;
        }
        if(!checkTextNull($(".contactLandline"),/^((\d{3,4})|\d{3,4}-|\s)?\d{7,14}$/,"电话格式错误")){
            alert("电话格式错误");
            return false;
        }
        if(!checkTextNull($(".contactMobilePhone"),/^1[3456789]\d{9}$/,"手机格式错误")){
            alert("手机格式错误");
            return false;
        }
        var comeLen = $("#u82_input").val().length;
        var id = "";
        $.each($(".identified"),function(index,item) {
            id+=item.value;
        })
        if(!(/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(id))){
            alert("身份证格式错误");
            return false;
        }
        var nationLen = $(".nationalId").val();
        var oldP = $(".householdRegistrationProvince").val();
        var oldC = $(".householdRegistrationCity").val();
        var oldc = $(".householdRegistrationCounty").val();
        var oldT = $(".householdRegistrationTownship").val();
        var nowP = $(".nowInProvince").val();
        var nowC = $(".nowInCity").val();
        var nowc = $(".nowInCounty").val();
        var nowT = $(".nowInTownship").val();
        var religious = $("input[name='religiousBeliefs']:checked").val();
        var working = $("input[name='workingConditions']:checked").val();
        if(comeLen<=0||nationLen=="0"||oldP=="0"||working==undefined
            ||oldC=="0"||oldc=="0"||oldT=="0"||nowP=="0"||nowC=="0"||nowc=="0"||nowT=="0"||religious==undefined){
            alert("输入格式错误，请修改红色必选项");
            return false;
        }
        return true;
    }
    /**
     * 图片改变
     */
    function changeImage() {
        $("input[type='file']").change(function() {
            var file = this.files[0];
            if(window.FileReader){
                var reader = new FileReader();
                reader.readAsDataURL(file);
                reader.onloadend=function (ev) {
                    $("#u85_img").attr("src",ev.target.result);
                }
            }
        })
    }


    /**
     * 输入身份证自动跳转下一位
     */
    function inputIdentified(el) {
        var ids = document.querySelectorAll(el);
        for(var i = 0; i < ids.length; i++) {
            var t = ids[i];
            t.index = i;
            t.setAttribute("readonly",true);
            t.onkeyup = function() {
                this.value = this.value.replace(/[^\d]/g,'');
                var next = this.index+1;
                if(next > ids.length-1){
                    return;
                }
                ids[next].removeAttribute("readonly");
                if(this.value){
                    ids[next].focus();
                }
            }
        }
        ids[0].removeAttribute("readonly");
    }
    /**
     * 提交信息
     */
    function submitInformation() {
        if(!checkString()){
            return;
        }
        var form = $("#form");
        var formData = new FormData(form[0]);
        var split = location.href.split("userId=");
        if(session!=""){
            var userId = session;
            formData.append("userId",userId);
        }
        var identified = "";
        $.each($(".identified"),function(index,item) {
            identified+=item.value;
        })
        formData.append("identified",identified);
        if($("input[name='image']").prop("files")!=undefined&&$("input[name='image']").prop("files")!=""&&$("input[name='image']").prop("files")!=null)
            formData.append("image",$("input[name='image']").prop("files")[0]);
        if($("#id").val()!=""){
            formData.append("id",$("#id").val())
        }
        $.ajax({
            url:"/getPersonalInformation",
            type:"post",
            data:formData,
            async:false,
            processData: false,
            contentType: false,
            success:function(data) {
                $("#id").val(data);
                alert("添加成功，审核中，请填写其他信息");
                toSpouse();
            }
        })

    }
    /**
     * 获得所有民族
     */
    function loadAllNation() {
        $.ajax({
            url:"/loadAllNation",
            dataType:"json",
            type:"post",
            async:false,
            success:function(data) {
                var html = "<option value='0' >请选择：</option>";
                var nation = $(".nationalId");
                nation.empty();
                $.each(data,function(index,item) {
                    html+="<option value='"+item.id+"' >"+item.name+"</option>";
                })
                nation.append(html)
            }
        })
    }

    /**
     * 户籍
     * 根据县码获得所有镇
     */
    function loadOldTownshipByCounty() {
        var county = $(".householdRegistrationCounty").val();
        $.ajax({
            url:"/loadNowTownshipByCounty",
            dataType:"json",
            data:{county:county},
            type:"post",
            async:false,
            success:function(data) {
                var township = $(".householdRegistrationTownship");
                township.empty();
                var html = "<option value='0' >请选择镇：</option>";
                $.each(data,function(index,item) {
                    html+="<option value='"+item.code+"' >"+item.name+"</option>"
                });
                township.append(html);
            }
        })
    }
    /**
     * 户籍
     * 根据市码获得所有县
     */
    function loadOldCountyByCity() {
        var city = $(".householdRegistrationCity").val();
        $.ajax({
            url:"/loadNowCountyByCity",
            dataType:"json",
            data:{city:city},
            type:"post",
            async:false,
            success:function(data) {
                var county = $(".householdRegistrationCounty");
                county.empty();
                var html = "<option value='0' >请选择区：</option>";
                $.each(data,function(index,item) {
                    html+="<option value='"+item.code+"' >"+item.name+"</option>"
                });
                county.append(html);
            }
        })
    }
    /**
     * 户籍
     * 根据省码获得所有市
     */
    function loadOldCityByProvince() {
        var province = $(".householdRegistrationProvince").val();
        $.ajax({
            url:"/loadNowCityByProvince",
            dataType:"json",
            data:{province:province},
            type:"post",
            async:false,
            success:function(data) {
                var city = $(".householdRegistrationCity");
                city.empty();
                var html = "<option value='0' >请选择市：</option>";
                $.each(data,function(index,item) {
                    html+="<option value='"+item.code+"' >"+item.name+"</option>"
                });
                city.append(html);
            }
        })
    }
    /**
     * 现居
     * 根据县码获得所有镇
     */
    function loadNowTownshipByCounty() {
        var county = $(".nowInCounty").val();
        $.ajax({
            url:"/loadNowTownshipByCounty",
            dataType:"json",
            data:{county:county},
            type:"post",
            async:false,
            success:function(data) {
                var township = $(".nowInTownship");
                township.empty();
                var html = "<option value='0' >请选择镇：</option>";
                $.each(data,function(index,item) {
                    html+="<option value='"+item.code+"' >"+item.name+"</option>"
                });
                township.append(html);
            }
        })
    }
    /**
     * 现居
     * 根据市码获得所有县
     */
    function loadNowCountyByCity() {
        var city = $(".nowInCity").val();
        $.ajax({
            url:"/loadNowCountyByCity",
            dataType:"json",
            data:{city:city},
            type:"post",
            async:false,
            success:function(data) {
                var county = $(".nowInCounty");
                county.empty();
                var html = "<option value='0' >请选择区：</option>";
                $.each(data,function(index,item) {
                    html+="<option value='"+item.code+"' >"+item.name+"</option>"
                });
                county.append(html);
            }
        })
    }
    /**
    * 现居
    * 根据省码获得所有市
    */
    function loadNowCityByProvince() {
        var province = $(".nowInProvince").val();
        $.ajax({
            url:"/loadNowCityByProvince",
            dataType:"json",
            data:{province:province},
            type:"post",
            async:false,
            success:function(data) {
                var city = $(".nowInCity");
                city.empty();
                var html = "<option value='0' >请选择市：</option>";
                $.each(data,function(index,item) {
                    html+="<option value='"+item.code+"' >"+item.name+"</option>"
                });
                city.append(html);
            }
        })
    }
    /**
    * 获得所有省
    */
    function loadAllProvince() {
        $.ajax({
            url:"/loadAllProvince",
            dataType:"json",
            type:"post",
            async:false,
            success:function(data) {
                var provinceNow = $(".nowInProvince");
                var provinceOld = $(".householdRegistrationProvince");
                provinceNow.empty();
                provinceOld.empty();
                var html = "<option value='0' >请选择省：</option>";
                $.each(data,function(index,item) {
                    html+="<option value='"+item.code+"' >"+item.name+"</option>";
                });
                provinceOld.append(html);
                provinceNow.append(html);
            }
        });
    }

</script>
</html>
